package com.buer.storage.business.dao;


import com.buer.storage.business.dto.CorderDto;
import com.buer.storage.business.dto.CorderStorageDto;
import com.buer.storage.business.dto.CorderdetailsDto;
import com.buer.storage.business.dto.StockDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CorderDao {
    //盘点单增加
    int insertCorder(CorderStorageDto corderStorageDto);

    //盘点商品单增加
    int insertCorderdetails(@Param(value = "arrary") CorderdetailsDto[] corderPutProds);

    //查询盘点表
    List<CorderStorageDto> findCorderAllById(Integer checkId);

    //根据盘点表ID查询盘点表详情信息
    CorderdetailsDto[] findCorderdetailsAllById(Integer checkId);

    //查询所有盘点单
    List<CorderDto> findCorderAll();

    //根据盘点单ID删除所有盘点信息
    int deleteCorderAllById(Integer checkId);

    //根据盘点单ID删除盘点信息
    int deleteCorderByCheckId(Integer checkId);

    //根据盘点单ID删除盘点商品信息
    int deleteCorderDetailsByCheckId(Integer checkId);

    List<StockDto> findStockByWarehouseId(Integer warehouseId);

    List<StockDto> findStockByProdArea(Integer prodArea, Integer warehouseId);

    List<StockDto> findStockByProdDepart(Integer prodDepart, Integer prodArea, Integer warehouseId);

    List<StockDto> searchStock(String prodCode, String prodName, Integer prodArea, Integer prodDepart);

}
